<script>
export default {
  name: "Article",
  data() {
    return {
      tableData: [
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333,
          status: '审核中'
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333,
          status: '审核通过'
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333,
          status: '审核不通过 '
        }
      ]
    }
  },
  methods: {
    creation() {
      this.$router.push('/creation')
    }
  }
}
</script>

<template>
<div>
  <el-button class="creation" type="primary" @click="creation">写文章</el-button>
  <el-table
      :data="tableData"
      border
      style="width: 100%">
    <el-table-column
        prop="province"
        label="标题"
        width="299">
    </el-table-column>
    <el-table-column
        prop="date"
        label="发布日期"
        width="200">
    </el-table-column>
    <el-table-column
        prop="status"
        label="状态"
        width="200">
    </el-table-column>
    <el-table-column
        fixed="right"
        label="操作"
        width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
        <el-button type="text" size="small">编辑</el-button>
      </template>
    </el-table-column>
  </el-table>
  <div class="page">
    <el-pagination
        background
        layout="prev, pager, next"
        :total="1000">
    </el-pagination>
  </div>
</div>
</template>

<style scoped lang="css">
.page {
  padding-left: 195px;
}
.creation {
  margin-bottom: 13px;
}
</style>
